<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="pg" uri="http://jsptags.com/tags/navigation/pager"%>
<%
	String url = request.getParameter("url");
	//Integer total =Integer.parseInt(request.getParameter("items"));
%>

<%-- <pg:pager url="<%=url%>"  items="<%=total%>"  maxPageItems="5"  maxIndexPages="15" export="currentPageNumber=pageNumber">
	<pg:first><a href="${pageUrl }">Home</a></pg:first> 
	<pg:prev><a href="${pageUrl }">Previous</a></pg:prev>
	<pg:pages>
		<c:choose>
			<c:when test="${currentPageNumber eq pageNumber}">
				<font color="red">${pageNumber }</font>
			</c:when>   
			<c:otherwise>
				<a href="${pageUrl }">${pageNumber }</a> 
			</c:otherwise>   
		</c:choose>   
	</pg:pages> 
	<pg:next> 
		<a href="${pageUrl }">Next</a>   
	</pg:next>   
	<pg:last>   
		<a href="${pageUrl }">End</a>   
	</pg:last>   
</pg:pager> --%>



<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>

	<div class="row clearfix">
		<div class="panel panel-default">
			<div class="panel-heading no-collapse">User List</div>
				<table class="table table-bordered table-striped">
					<thead>
						<tr>
							<th>User Name</th>
							<th>Sex</th>
							<th>Age</th>
							<th>Email</th>
							<th>Role Name</th>
							<th>Remark</th>
							<th style="width: 3.5em;"></th>
						</tr>
					</thead>
					<tbody>
					<c:forEach items="${page.dates}" var="examTest">
						<tr>
							<td>${examTest.id}</td>
							<td>${examTest.content}</td>
							<td>${examTest.chooseA}</td>
							<td>${examTest.chooseB}</td>
							<td>${examTest.chooseC}</td>
							<td>${examTest.chooseD}</td>
							<td>
								<a href="${pageContext.request.contextPath}/users/edit/${user.id}">
									<i class="fa  fa-pencil"></i>
								</a>
								<a href="${pageContext.request.contextPath}/users/delete/${user.id}"  role="button"  data-toggle="modal">
									<i class="fa fa-trash-o"></i>
								</a>
							</td>
						</tr>
					</c:forEach>
					<tr>
						<td colspan="4">
						<%--<pg:pager   url="<%=url   %>"   items="<%=total   %>" maxPageItems="5" maxIndexPages="15" export="currentPageNumber=pageNumber">   <pg:first>   <a href="${pageUrl }">Home</a>   </pg:first>   <pg:prev>   <a href="${pageUrl }">Previous</a>   </pg:prev>   <pg:pages>   <c:choose>   <c:when     test="${currentPageNumber     eq pageNumber}">   <font color="red">${pageNumber }</font>   </c:when>   <c:otherwise>   <a href="${pageUrl }">${pageNumber }</a>   </c:otherwise>   </c:choose>   </pg:pages>   <pg:next>   <a href="${pageUrl }">Next</a>   </pg:next>   <pg:last>   <a href="${pageUrl }">End</a>   </pg:last>   </pg:pager>   --%>
							<jsp:include page="Template/page.jsp">
								<jsp:param name="url" value="page"/>
								<jsp:param name="items" value="${page.totalSize}"/>   
							</jsp:include>
						</td>
					</tr>
					</tbody>
				</table>
			</div>
		</div>
</body>
</html>